package strategy

import (
	"math"
)

type BalancedBandwidthStrategy struct{}

func (s *BalancedBandwidthStrategy) GetType() ConstraintType {
	return BalancedBandwidth
}

func (s *BalancedBandwidthStrategy) Evaluate(current MultiObjectiveScore, link *LinkWithAttrs) MultiObjectiveScore {
	newScore := append(MultiObjectiveScore{}, current...)
	newScore[3] = math.Max(current[3], link.Utilization)
	return newScore
}

func (s *BalancedBandwidthStrategy) Apply(args ...interface{}) bool {
	return true
}
